package ru.amse.tsyganov.jumleditor.graphicaleditor.activity;

import ru.amse.tsyganov.jumleditor.graphicaleditor.GraphicalEditor;
import ru.amse.tsyganov.jumleditor.graphicaleditor.common.AddStateMode;
import ru.amse.tsyganov.jumleditor.model.activity.Decision;
import ru.amse.tsyganov.jumleditor.model.common.State;
import ru.amse.tsyganov.jumleditor.view.activity.DecisionView;
import ru.amse.tsyganov.jumleditor.view.common.StateView;

public class AddDecisionMode extends AddStateMode {

	public AddDecisionMode(GraphicalEditor graphicalEditor) {
		super(graphicalEditor);
	}

	@Override
	public StateView<? extends State> createNewState() {
		Decision decision = new Decision();
		DecisionView<? extends Decision> newDecision = 
			new DecisionView<Decision>(decision, getEditor().getActivityGraphView());
		
		return newDecision;
	}

}
